home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / forms / frmwiz / chngfld.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-28  |  5.1 KB  |  187 lines

  1. VERSION 2.00
  2. Begin Form ChngFld
  3. HelpContextID = 36
  4. BackColor       =   &H00C0C0C0&
  5. BorderStyle     =   3  'Fixed Double
  6. Caption         =   "Field Attributes"
  7. ClientHeight    =   2385
  8. ClientLeft      =   3120
  9. ClientTop       =   2565
  10. ClientWidth     =   4095
  11. ControlBox      =   0   'False
  12. Height          =   2790
  13. Left            =   3060
  14. LinkTopic       =   "Form1"
  15. MaxButton       =   0   'False
  16. MinButton       =   0   'False
  17. ScaleHeight     =   2385
  18. ScaleWidth      =   4095
  19. Top             =   2220
  20. Width           =   4215
  21. Begin SSCommand BtnCancel
  22. HelpContextID = 24
  23. AutoSize        =   2  'Adjust Button Size To Picture
  24. Caption         =   "&Cancel"
  25. Font3D          =   2  'Raised w/heavy shading
  26. Height          =   615
  27. Left            =   1560
  28. Picture         =   CHNGFLD.FRX:0000
  29. TabIndex        =   9
  30. Tag             =   "Cancel building the form"
  31. Top             =   1320
  32. Width           =   915
  33. Begin SSCommand BtnOK
  34. HelpContextID = 37
  35. AutoSize        =   2  'Adjust Button Size To Picture
  36. Caption         =   "&OK"
  37. Font3D          =   2  'Raised w/heavy shading
  38. Height          =   615
  39. Left            =   660
  40. Picture         =   CHNGFLD.FRX:0302
  41. TabIndex        =   8
  42. Tag             =   "Generate the form code"
  43. Top             =   1320
  44. Width           =   915
  45. Begin SSCommand BtnHelp
  46. Caption         =   "&Help"
  47. Font3D          =   2  'Raised w/heavy shading
  48. Height          =   615
  49. Left            =   2460
  50. Picture         =   CHNGFLD.FRX:0604
  51. TabIndex        =   7
  52. Top             =   1320
  53. Width           =   915
  54. Begin SSPanel cMsg
  55. Align           =   2  'Align Bottom
  56. Alignment       =   1  'Left Justify - MIDDLE
  57. BevelInner      =   1  'Inset
  58. BorderWidth     =   2
  59. ForeColor       =   &H00FF0000&
  60. Height          =   375
  61. Left            =   0
  62. TabIndex        =   5
  63. Top             =   2010
  64. Width           =   4095
  65. Begin SSCheck ChkSameLine
  66. HelpContextID = 38
  67. Caption         =   "Put On Same Line As Previous Field"
  68. Height          =   255
  69. Left            =   120
  70. TabIndex        =   1
  71. Tag             =   "Place field on the same line as previous field"
  72. Top             =   960
  73. Width           =   3675
  74. Begin TextBox TxtLabel
  75. HelpContextID = 39
  76. BackColor       =   &H00C0C0C0&
  77. Height          =   315
  78. Left            =   1140
  79. TabIndex        =   0
  80. Tag             =   "Label to use on the form for the field"
  81. Text            =   "Field Name"
  82. Top             =   540
  83. Width           =   2655
  84. Begin SSPanel LblField
  85. HelpContextID = 40
  86. Alignment       =   1  'Left Justify - MIDDLE
  87. BevelInner      =   2  'Raised
  88. BevelOuter      =   0  'None
  89. BorderWidth     =   2
  90. Caption         =   "Field Name"
  91. Height          =   315
  92. Left            =   1140
  93. TabIndex        =   3
  94. Top             =   120
  95. Width           =   2655
  96. Begin Label LblRow
  97. BackColor       =   &H00FFFF80&
  98. Caption         =   "LblRow"
  99. Height          =   315
  100. Left            =   120
  101. TabIndex        =   6
  102. Top             =   1380
  103. Visible         =   0   'False
  104. Width           =   495
  105. Begin Label Label1
  106. AutoSize        =   -1  'True
  107. BackColor       =   &H00C0C0C0&
  108. Caption         =   "Field Label"
  109. ForeColor       =   &H00FF0000&
  110. Height          =   195
  111. Index           =   1
  112. Left            =   120
  113. TabIndex        =   4
  114. Top             =   600
  115. Width           =   945
  116. Begin Label Label1
  117. AutoSize        =   -1  'True
  118. BackColor       =   &H00C0C0C0&
  119. Caption         =   "Field Name"
  120. ForeColor       =   &H00FF0000&
  121. Height          =   195
  122. Index           =   0
  123. Left            =   120
  124. TabIndex        =   2
  125. Top             =   180
  126. Width           =   960
  127. Option Explicit
  128. Sub BtnCancel_Click ()
  129.     Unload ChngFld
  130. End Sub
  131. Sub BtnCancel_GotFocus ()
  132.     cMsg.Caption = BtnCancel.Tag
  133. End Sub
  134. Sub BtnCancel_LostFocus ()
  135.     cMsg.Caption = ""
  136. End Sub
  137. Sub BtnHelp_Click ()
  138.     SendKeys "{F1}"
  139. End Sub
  140. Sub BtnOK_Click ()
  141.     Dim irow As Integer
  142.     irow = Val(LblRow.Caption)
  143.     DataForm.GrdFields.Row = irow
  144.     DataForm.GrdFields.Col = 1
  145.     DataForm.GrdFields.Text = TxtLabel.Text
  146.     DataForm.GrdFields.Col = 2
  147.     If ChkSameLine.Value = True Then
  148.         DataForm.GrdFields.Text = "Yes"
  149.     Else
  150.         DataForm.GrdFields.Text = "No"
  151.     End If
  152.     Unload ChngFld
  153. End Sub
  154. Sub BtnOK_GotFocus ()
  155.     cMsg.Caption = BtnOK.Tag
  156. End Sub
  157. Sub BtnOK_LostFocus ()
  158.     cMsg.Caption = ""
  159. End Sub
  160. Sub ChkSameLine_GotFocus ()
  161.     cMsg.Caption = ChkSameLine.Tag
  162. End Sub
  163. Sub ChkSameLine_LostFocus ()
  164.     cMsg.Caption = ""
  165. End Sub
  166. Sub FldGotFocus (PControl As Control)
  167.     PControl.BackColor = BLUE
  168.     PControl.ForeColor = WHITE
  169.     PControl.SelStart = 0
  170.     PControl.SelLength = 1000
  171.     cMsg.Caption = PControl.Tag
  172. End Sub
  173. Sub FldLostFocus (PControl As Control)
  174.     PControl.BackColor = RB_GRAY
  175.     PControl.ForeColor = BLACK
  176.     cMsg.Caption = ""
  177. End Sub
  178. Sub Form_Paint ()
  179.     Form3d Me
  180. End Sub
  181. Sub TxtLabel_GotFocus ()
  182.     FldGotFocus TxtLabel
  183. End Sub
  184. Sub TxtLabel_LostFocus ()
  185.     FldLostFocus TxtLabel
  186. End Sub
  187.